<!--  -->
<template>
    <view class="bg-white px-4 mx-4 my-2 rounded-lg">
        <view
            v-for="(item, index) in list"
            :key="index"
            @click="item.action"
            class="flex justify-between items-center text-base"
        >
            <view class="iconfont text-xl" :class="item.icon"></view>
            <view
                class="w-11/12 flex justify-between items-center py-3"
                :class="index != list.length - 1 && ' border-b '"
            >
                <view class="w-11/12">{{ item.label }}</view>
                <uni-icons type="right" color="#a3af9c"></uni-icons>
            </view>
        </view>
    </view>
</template>

<script setup lang="ts">
import { ref } from "vue";
const action = (e: MouseEvent) => {
    console.log(e);
};
const list = ref([
    {
        icon: "icon-ic_me_maijia",
        label: "卖家发布",
        action: action,
    },
    {
        icon: "icon-ic_me_yuyue",
        label: "预约看房",
        action: action,
    },
    {
        icon: "icon-ic_me_goufang",
        label: "成交记录",
        action: action,
    },
    {
        icon: "icon-ic_me_kefu",
        label: "联系客服",
        action: action,
    },
    {
        icon: "icon-ic_me_shezhi",
        label: "个人设置",
        action: action,
    },
]);
</script>
<style scoped lang="scss">
/* @import url(); 引入css类 */
</style>
